package top.fsb.quartz.schedule.manager.dao;

import top.fsb.quartz.schedule.manager.pojo.ServInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ServInfoDao {

	public abstract void save(ServInfo servInfo);

	public abstract void delete(@Param("servid") String servid);

	public abstract ServInfo get(@Param("servid") String servid);

	public abstract List<ServInfo> findServInfo(ServInfo servInfo);
	public abstract int findServInfoCount(ServInfo servInfo);

	public abstract void updateUpdatetimeStatusByServid(@Param("servid") String servid, @Param("status") Integer status);

	public abstract void updateDestroy(@Param("destroyStatus") Integer destroyStatus, @Param("destroyTime") Integer destroyTime);

	public abstract void deleteDestroyLtDate(@Param("destroyStatus") Integer destroyStatus, @Param("date") Date date);

	public abstract ServInfo getByStatusIsleader(@Param("status") Integer status, @Param("isleader") Integer isleader);

	public abstract void updateChooseLeader(@Param("status") Integer status, @Param("isleader") Integer isleader);

	public abstract void updateIsleaderByStatus(@Param("status") Integer status, @Param("isleader") Integer isleader);

	public abstract List<ServInfo> findByStatus(@Param("status") Integer status);

	public abstract void updateNoLeader(@Param("status") Integer status);
}
